<{include file="public/header.html"}> 		
		<!--main-->
		<div class="third-main">
			<div class="create clear">
				<ul>
					<li class="reset-pass">密码重置</li>
				</ul>
			</div>
                    <form id="forget-pass-form" action="" method="post" autocomplete="off" novalidate="novalidate">
                        <{if $step == 1}>
			<!--1、确认所绑定的手机号码-->
			<div id="sure-phone" class="reset-content" style="display: block;">
				<b class="icon-sure mb68"></b>
				<ul>
					<li>
						<div>
							<span>手机号码：</span>
                                                        <input class="phone required" type="text" id="uMobile" name="uMobile" placeholder="请输入账号所绑定的手机号码" maxlength="11"/>
						</div>
					</li>
					<li>
						<div>
							<span>验证码：</span>
                                                        <input class="phone-code required" type="text" name="smsCode" placeholder="请手机验证码" maxlength="6"/>
                                                        <button class="send" id="sendCodeBtn" style="background:#dcdcdc;cursor:not-allowed;" disabled="disabled" onclick="sendSMSCode(this,'uMobile','m');return false;">发送验证码</button>
						</div>
					</li>
                                        <li><span></span><input type="submit" class="sure" value="点击验证"></li>
				</ul>
			</div>
                        <{/if}>
                        <{if $step == 2}>
			<!--2、下一步-重置手机号码-->
			<div id="reset-phone" class="reset-content">
				<b class="icon-reset"></b>
				<ul>
					<li>
						<div>
							<span>密码：</span>
                                                        <input class="phone required" id="newPass" name="newPass" type="password" placeholder="请输入新登录密码" maxlength="16"/>
						</div>
					</li>
					<li>
						<div>
							<span>确认密码：</span>
                                                        <input class="phone required" name="rePass" type="password" placeholder="再次输入密码 "  maxlength="16"/>
						</div>
					</li>
                                        <li><span></span><input type="submit" class="sure" value="确认修改"/></li>
				</ul>
			</div>	
                        <{/if}>
                        <{if $step == 3}>
			<!--3、修改成功-->
			<div id="phone-success" class="reset-content">
				<b class="icon-reset-success mb68"></b>
				<div class="reset-change">
					<b class="icon icon-big-success"></b>
					<div class="congratulate">恭喜您，重置密码成功</div>
                                        <a href="<{eval url('account/login')}>">返回重新登录</a>
				</div>
			</div>	
                        <{/if}>
                        </form>
		</div>
                <script type="text/javascript">
                 $("body").find("#forget-pass-form").validate({
                    submitHandler: function(form) {
                        var _J_form=$(form),data=$(form).serialize();
                        doRequest("",data,false,function(data){clearForm();window.location.href=data.redirectURL;},errorCallback);
                    },
                    rules:{
                        uMobile:{isMobile:true,remote:{
                                    type:"POST",
                                    url:"/index.php/site/checkLoginMobile.html"}
                            },
                        smsCode:{smscode:true,remote:{
                                            type:"POST",
                                            url:"/index.php/site/checkSmsCode.html"}
                                },
                        newPass:{isPwd:true},
                        rePass:{equalTo:"#newPass"}
                    },		
                    messages:{
                        uMobile:{required:"请输入绑定的手机号码",remote:"手机号码不存在"},
                        smsCode:{required:"请输入6位短信验证码",remote:"验证码输入错误"},
                        newPass:{required:"请输入新登录密码"},
                        rePass:{required:"请再次输入您的登录密码",equalTo:"密码不一致，请再次确认"}
                    },
                    errorPlacement: function(error,element)
                    {
                        error.appendTo ( element.parent() );
                        error.addClass('error');
                        if(element.attr("name") == "uMobile"){
                            $("#sendCodeBtn").css("cursor","not-allowed").attr("disabled","true").css("background","#dcdcdc").css("cursor","not-allowed");
                        }
                    },	
                    success: function(label) {
                        if(label.attr("for")  == "uMobile"){
                            $("#sendCodeBtn").css("cursor","pointer").removeAttr("disabled").css("background","#82cafa").css("cursor","pointer");
                        }
                        label.remove();
                    }
                });   
                </script>
		<!--footer-->
		<{include file="public/footer.html"}> 	